<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\SetMealOrder */

$this->title = '详情';
$this->params['breadcrumbs'][] = ['label' => '订单列表', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="set-meal-order-view">

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id',
            'alipay',
            'name',
            'mobile',
            'address',
            [
                'attribute' => 'created_at',
                'value' => function ($m) {
                    return date('Y-m-d H:i:s', $m->created_at);
                }
            ],
            [
                'attribute' => 'updated_at',
                'value' => function ($m) {
                    return date('Y-m-d H:i:s', $m->updated_at);
                }
            ],

            [
                'attribute' => 'status',
                'value' => function ($m) {
                    /**
                     * @var $status \common\models\Order
                     */
                    return \common\models\Order::$status[$m->status];
                }
            ],

            [
                'attribute' => 'is_cancel',
                'value' => function ($m) {
                    return \common\models\Order::$isCancel[$m->is_cancel];
                }
            ],



        ],
    ]) ?>

</div>
